switch: Remove unneeded checks
authorBenjamin Otte <otte@redhat.com>
Wed, 30 Apr 2014 07:11:58 +0000 (09:11 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 1 May 2014 12:51:28 +0000 (14:51 +0200)
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.

gtk/gtkswitch.c

index 72599dd440ec43d2fe1414b132861631a991178f..ecca03117e77864eb39c51e716647d8f47c56c0c 100644 (file)
@@ -365,11 +365,8 @@ gtk_switch_get_preferred_width (GtkWidget *widget,
 
   g_object_unref (layout);
 
-  if (minimum)
-    *minimum = width;
-
-  if (natural)
-    *natural = width;
+  *minimum = width;
+  *natural = width;
 }
 
 static void
@@ -417,11 +414,8 @@ gtk_switch_get_preferred_height (GtkWidget *widget,
   g_object_unref (layout);
   g_free (str);
 
-  if (minimum)
-    *minimum = height;
-
-  if (natural)
-    *natural = height;
+  *minimum = height;
+  *natural = height;
 }
 
 static void